home *** CD-ROM | disk | FTP | other *** search
-
- ~4Dgifts/src/exampleCode/GLX/dualhead README
-
-
- The sample code, dualhead.c, illustrates the basics of writing code
- that can take advantage of multiple screens. If the environment
- variable ALT_DISPLAY is set to a display other than the default
- DISPLAY, dualhead will open windows on that display, provided of
- course that it has access to do so (see the xhost(1) man page for
- specifics).
-
- For example purposes, lets say you have access to 2 machines,
- machine "A" and machine "B". To run dualhead on machine "A", set
- the ALT_DISPLAY environment variable to "B:0.0". At the unix
- prompt, this would be done as:
-
- setenv ALT_DISPLAY B:0.0
-
- Alternatively, if you have a single machine with 2 screens,
- setting the ALT_DISPLAY variable to :0.1 will cause dualhead to
- take advantage of the two screens. This could be done as:
-
- setenv ALT_DISPLAY :0.1
-
- Now run dualhead. You should see a window displayed on machine
- "A" with 3 buttons: "newGL", "newX", and "switch screen".
- Pressing the "newGL" button will cause a window with a GL drawing
- area to come up on machine B (or the second screen if running on
- a dual-head system). Pushing the "newX" button will cause a
- similar result, only an X window will be created. Note that
- "newGL" windows on the ALT_DISPLAY are filled red and "newX"
- windows are filled black. The name of the display is also at the
- top of the screen in the window name bar. Hitting the "switch
- screen" button will toggle the current screen, so that any
- "newGL" or "newX" windows created will show up on the other
- screen. "newGL" windows on the main display will be filled blue,
- "newX" windows filled white.
-
-
- All of the windows created are applicationShellWidgets, so if you
- kill one, you kill them all. You could use other types of shells
- so that you could kill them individually. The excersize is left
- to the reader.
-
- created by the late Derek "pugster" Spears, 92-93
-